#include<stdio.h>

char* find(const char* source,const char* chars)
{
	char* p1=source,*p2=chars;
	while(*p1)
	{
		p2=chars;
		while(*p2)
		{
			if(*p2==*p1)
				return p1;
			p2++;
		}
		p1++;
	}
	return NULL;
}

int main()
{
	char source[100]={0};
	char chars[100]={0};
	scanf("%[^\n] %[^\n]",source,chars);
	char* pc=find(source,chars);
	if(pc!=NULL)
		printf("%c\n",*pc);
	else
		printf("no!\n");
	return 0;
}
